﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace Chinaer.Model.Entities
{
    [Table("Log")]
    public class Model_Log:Model_Base
    {
        private string _id = string.Empty;
        [Key]
        [Required]
        [Column("ID")]
        public string ID
        {
            get
            {
                if (string.IsNullOrEmpty(_id))
                {
                    return Guid.NewGuid().ToString().Replace("-", "");
                }
                return _id;
            }
            set
            {
                _id = value;
            }
        }

        public DateTime? Date { get; set; }

        public string Thread { get; set; }

        public string Level { get; set; }

        public string Message { get; set; }

        public string Exception { get; set; }
    }
}
